<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 例题01
      /*
        GO {
          a:undefined
          demo:fn
        }
      */
      function demo() {
        //声明一个函数，函数并不执行
        /*
          AO {
            b:undefined
          }
        */
        console.log(b) //undefined
        if (a) {
          // AO里面没有a 那么这个语句不执行
          var b = 100
        }
        console.log(b) //undefined
        c = 234 // window.c = 234
        console.log(c) //234
      }
      var a
      demo()
      a = 10
      console.log(c) //234
    </script>
  </body>
</html>
